package cn.edu.sdjzu.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class HelloWorldService {
    @Autowired
    private RestTemplate restTemplate; // 注入 RestTemplate

    public String getHelloWorld() {
        // 通过 RestTemplate 调用其他服务
        return restTemplate.getForObject("http://provider-service/hello", String.class);
    }
}